import request from '@/utils/request'

export function getList(params) {
  return request({
    url: '/cicd/workorder/',
    method: 'get',
    params
  })
}
export function getDetail(params) {
  return request({
    url: '/cicd/workorder/' + params.id + '/info/',
    method: 'get',
    params
  })
}
export function getPods(params) {
  return request({
    url: '/cicd/workorder/' + params.id + '/pods/',
    method: 'get',
    params
  })
}

export function getSteps(params) {
  return request({
    url: 'cicd/workorder/' + params.id + '/steps/',
    method: 'get',
    params
  })
}

export function getRepotags(params) {
  return request({
    url: 'cicd/workorder/repotags/',
    method: 'get',
    params
  })
}

export function doStep(params) {
  return request({
    url: 'cicd/workorder/' + params.id + '/do/',
    method: 'post',
    data: params
  })
}

export function addRow(params) {
  return request({
    url: '/cicd/workorder/',
    method: 'post',
    data: params
  })
}

export function getResources(params) {
  return request({
    url: 'cicd/workorder/resources/',
    method: 'get',
    params
  })
}

export function getReplicas(params) {
  return request({
    url: 'cicd/workorder/replicas/',
    method: 'get',
    params
  })
}
